package com.thinkingcoder.common.util;

/**
 * For runtime.
 */
public interface RuntimeUtils {

    static long getPid() {
        return java.lang.management.ManagementFactory.getRuntimeMXBean().getPid();
    }

    static String getCommandLine() {
        return java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments().stream()
            .reduce((a, b) -> a + " " + b).orElse("null");
    }

}
